﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toastinet="clr-namespace:Toastinet;assembly=Toastinet"
    x:Class="ToastinetSample.ToastinetPortableContent"
    mc:Ignorable="d"
    DataContext="{Binding RelativeSource={RelativeSource Self}}"
    d:DesignHeight="480" d:DesignWidth="480">

    <Grid x:Name="LayoutRoot">

        <toastinet:Toastinet x:Name="Toast"
			Message="{Binding Message, Mode=TwoWay}"
            Background="#E67F22"
			Canvas.ZIndex="1"
			Queued="True"
			VerticalAlignment="Top">
            <StackPanel Margin="10">
                <TextBlock FontSize="20" Text="- custom content"/>
                <TextBlock FontSize="20" Text="- dynamic height"/>
                <TextBlock FontSize="20" Text="{Binding Message, Mode=TwoWay}"/>
                <Image Source="toast.png" Height="60"></Image>
            </StackPanel>
        </toastinet:Toastinet>
  
        <toastinet:Toastinet Grid.Row="0"
			x:Name="Toast2"
			Duration="1"
			FontSize="25"
            Padding="50"
			TextHAlignment="Center"
			AnimationType="Vertical"
			Background="#2ecc71"
			Foreground="Black"
			TextWrapping="Wrap"
			Canvas.ZIndex="1"
			VerticalAlignment="Top" />

        <toastinet:Toastinet x:Name="Toast3"
			Duration="1"
            Height="50"
			Title="Toastinet"
			AnimationType="RightToLeft"
			Image="toast.png"
			Canvas.ZIndex="1"
			VerticalAlignment="Top" />

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Background="#E67F22"
                    VerticalAlignment="Top"
			Margin="0,20" Orientation="Horizontal">
            <Image Source="toast.png" Height="50" Margin="10,0"/>
            <TextBlock Text="Let's Toast with Toastinet" Margin="0" FontSize="18" VerticalAlignment="Center" />
        </StackPanel>

        <Button Background="Black" 
                Height="60"
                HorizontalAlignment="Right"
                VerticalAlignment="Top"
                Margin="0,-10,0,0" Padding="5"
                BorderThickness="1"
                FontSize="15"
                Content="Zone behind the toast is clickable"></Button>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Margin="12,100,12,0">

            <StackPanel>
                <Button Content="data binding + custom content" Click="OnBasicToast" Height="80"/>

                <Button Content="text wrapping" Click="OnBasicToast2" Height="80"/>

                <Button Content="animation LeftToLeft" Click="OnL2L" Height="80"/>

                <Button Content="animation RightToRight" Click="OnR2R" Height="80"/>

                <Button Content="animation LeftToRight" Click="OnL2R" Height="80"/>

                <Button Content="toast event" Click="OnEventToast" x:Name="ToastEventBtn" Height="80"/>

                <Button Content="fixed width" Click="OnNotStretch" Height="80"/>
            </StackPanel>

            <toastinet:Toastinet x:Name="Toast4"
				Duration="1"
                Padding="0"
                Background="#E67F22"
				Message="Toasts are now clipped"
				AnimationType="RightToLeft"
				Width="250"
				Clipped="True"
				VerticalAlignment="Bottom"/>
        </Grid>

    </Grid>
</UserControl>